package com.ruoyi.common.redis.utils;

import com.ruoyi.common.redis.service.RedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

/**
 * redis常用方法
 */
@Component
public class RedisUtils {

    public static RedisTemplate redisTemplate;
    public static RedisService redisService;

    @Autowired
    public void setRedisTemplate(RedisTemplate redisTemplate) {
        RedisUtils.redisTemplate = redisTemplate;
    }

    @Autowired
    public void setRedisService(RedisService redisService) {
        RedisUtils.redisService = redisService;
    }
}
